﻿namespace Tatibah
{
    /// <summary>
    /// Defines what the Contents of a Header or Footer may contain
    /// </summary>
    public enum enumHeaderFooterContentType
    {
#pragma warning disable 1591
        Paragraph,
        Table,
        NumberedList,
        None
    }
#pragma warning restore 1591

    /// <summary>
    /// helper class for manipulating the Contents of a Header or Footer
    /// </summary>
    public class HeaderFooterContent
    {
        /// <summary>
        /// What the actual Content Type is
        /// </summary>
        public enumHeaderFooterContentType ContentType;

        /// <summary>
        /// The actual content
        /// </summary>
        private object Object = null;

        /// <summary>
        /// Contructor with a Paragraph as a parameter
        /// </summary>
        /// <param name="ThisParagraph"></param>
        public HeaderFooterContent(Paragraph ThisParagraph)
        {
            ContentType = enumHeaderFooterContentType.Paragraph;
            Object = ThisParagraph;
        }

        /// <summary>
        /// Contructor with a Table as a parameter
        /// </summary>
        /// <param name="ThisTable"></param>
        public HeaderFooterContent(Table ThisTable)
        {
            ContentType = enumHeaderFooterContentType.Table;
            Object = ThisTable;
        }

        /// <summary>
        /// Contructor with a NumberedList as a parameter
        /// </summary>
        /// <param name="ThisNumberedList"></param>
        public HeaderFooterContent(NumberedList ThisNumberedList)
        {
            ContentType = enumHeaderFooterContentType.NumberedList;
            Object = ThisNumberedList;
        }


        #region P R O P E R T I E S

        /// <summary>
        /// Get the Paragraph stored in the Contents
        /// </summary>
        public Paragraph Paragraph
        {
            get {return (Paragraph) Object;}
        }

        /// <summary>
        /// Get the Table stored in the Contents
        /// </summary>
        public Table Table
        {
            get { return (Table) Object; }
        }

        /// <summary>
        /// Get the NumberedList stored in the Contents
        /// </summary>
        public NumberedList NumberedList
        {
            get { return (NumberedList)Object; }
        }
        #endregion P R O P E R T I E S
    }
}
